import request from '@/utils/request'

// ----------------------------------------------------采购管理==>供应商管理 接口文档----------------------------------------------------------------------------

// 获取供应商管理列表---------------------------------------- 
export function list (params) {
  return request({
    url: '/function/supplier/list',
    method: 'get',
    params
  })
}

// 修改：修改供应商管理状态接口，启用---禁用---------------------------------------
export function status (data) {
  return request({
    url: '/function/supplier/changeStatus',
    method: 'put',
    data
  })
}

// 获取供应商管理列表详情---------------------------------------- 
export function listDetail (id) {
  return request({
    url: '/function/supplier/' + id,
    method: 'get',
  })
}

//新增： 获取评级字典列表---------------------------------------- 
export function listDictionary (params) {
  return request({
    url: '/system/dict/data/list',
    method: 'get',
    params
  })
}

//新增： 提交接口---------------------------------------- 
export function add (data) {
  return request({
    url: '/function/supplier',
    method: 'post',
    data
  })
}
// 修改：修改供应商列表接口---------------------------------------
export function update (data) {
  return request({
    url: '/function/supplier',
    method: 'put',
    data
  })
}
// ----------------------------------------------------采购管理==>供应商详情 接口文档----------------------------------------------------------------------------

// 相关设备列表----------------------------------------------------
export function listEquipment (params) {
  return request({
    url: '/function/equipment/account/partInfo/list',
    method: 'get',
    params
  })
}

// 相关物料列表----------------------------------------------------
export function listMaterial (params) {
  return request({
    url: '/function/consumable/base/partInfo/list',
    method: 'get',
    params
  })
}